#@layout()
#define js()
<script>
    $(function(){
        var _table;
        _table =$("#task-data-analysis").DataTable( {
            aLengthMenu:[10,20,50],
            "processing": true,
            "serverSide": true,
            "bLengthChange": false,
            "bSort":false,
            "bStateSave":true,
            searching: false,//屏蔽datatales的查询框
            "pagingType":   "full_numbers",
            "ajax":{
                "url": "/admin/task/gettaskDataAnalysisList",
                "type": "post",
                "data": function (params) {
                    var taskId = $("#task option:selected").attr("value");
                    var whId = $("#wh option:selected").attr("value");
                    params["taskId"]=taskId;
                    params["whId"]=whId;
                }
            },
            "columns": [
                { "data": "id" },
                { "data": "taskTitle" },
                { "data": "nickName" },
                { "data": "clickNum" },
                { "data": "cvsNum" },
                { "data": "iOS" },
                { "data": "Android" },
                { "data": "OS" },
                { "data": "Windows" },
                { "data": "money" }
            ]
        } );
        $("#searchBtn").click(function(){
            _table.ajax.reload();
        });

    });


</script>
#end

#define main()
<div class="page-container">

	<div class="text-c">
		任务名：
		<select id="task">
			<option>请选择</option>
			#for(obj : taskList)
			<option value="#(obj['id'])">#(obj["taskTitle"])</option>
			#end
		</select>

	</div>

	<div class="text-c">
		网红名：
		<select id="wh">
			<option>请选择</option>
			#for(obj : whList)
			<option value="#(obj['id'])">#(obj["nickName"])</option>
			#end
		</select>
	</div>
	<div class="text-c">
		<button name="" id="searchBtn" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i>检索</button>
	</div>


	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort" id="task-data-analysis">
			<thead>
			<tr class="text-c">
				<th>任务id</th>
				<th>任务标题</th>
				<th>网红昵称</th>
				<th>点击数</th>
				<th>转化数</th>
				<th>iOS</th>
				<th>Android</th>
				<th>OS X</th>
				<th>Windows</th>
				<th>收入</th>
			</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
	</div>
</div>
#end